@extends('Admin.layout.layout')
@section('title','用户列表')
@section('weizhi','用户列表')
@section('con')
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
           
            <!-- /.panel-heading -->
            <div class="panel-body">
                <div class="dataTable_wrapper">
                    <div id="dataTables-example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                    	<div class="row">
                    	<!-- 搜索表单开始 -->
                    		<form action="{{url('admin/user/index')}}?id=123" method="get">
	                    		<div class="col-sm-6">
	                    			<div class="dataTables_length" id="dataTables-example_length">
	                    				<label>显示
		                    				<select name="num" aria-controls="dataTables-example" class="form-control input-sm">
			                    				<option value="10">10</option>
			                    				<option value="25">25</option>
			                    				<option value="50">50</option>
			                    				<option value="100">100</option>
		                    				</select> 条
	                    				</label>
	                    			</div>
	                    		</div>
			                    <div class="col-sm-6">
			                    	<div id="dataTables-example_filter" class="dataTables_filter">
				                    	<label>Search:<input name="keywords" type="search" value="{{$data['keywords'] or ''}}" class="form-control input-sm" placeholder="" aria-controls="dataTables-example">
				                    	</label>
				                    	<button class="btn btn-primary" type="submit">搜索</button>
			                		</div>
			                	</div>
           					</form>
           					<!-- 搜索表单结束 -->
        				</div>
			    	<div class="row">
						<div class="col-sm-12">
							<table id="dataTables-example" class="table table-striped table-bordered table-hover dataTable no-footer" role="grid" aria-describedby="dataTables-example_info">
							    <thead>
							        <tr role="row">
							        	<th  style="text-align:center" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" style="width: 160px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">ID</th>
							        	<th style="text-align:center" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" style="width: 160px;" aria-label="Browser: activate to sort column ascending">用户名</th>
							        	<th style="text-align:center" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" style="width: 160px;" aria-label="Platform(s): activate to sort column ascending">邮箱号</th>
							        	<th style="text-align:center" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" style="width: 160px;" aria-label="Engine version: activate to sort column ascending">手机号</th>
							        	<th style="text-align:center" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" style="width: 160px;" aria-label="CSS grade: activate to sort column ascending">用户状态</th>
							        	<th style="text-align:center" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" style="width: 160px;" aria-label="CSS grade: activate to sort column ascending">用户操作</th>
							        	</tr>
							    </thead>
			                    <tbody>
			                    @foreach($user as $k=>$v)
			                          <tr class="gradeA odd" role="row" style="text-align:center">
			                                <td class="sorting_1">{{$v->id}}</td>
			                                <td>{{$v->username}}</td>
			                                <td>{{$v->useremail}}</td>
			                                <td class="center">{{$v->userphone}}</td>
			                                <td class="center">{{str_replace([0,1],['未激活','激活'],$v->userstatus)}}</td>
			                                <td class="center" ><a href="{{url('/admin/user/delete',['id'=>$v->id])}}">删除</a> | <a href="{{url('/admin/user/edit',['id'=>$v->id])}}">修改</a></td>
			                            </tr>
			                    @endforeach()
			                    </tbody>
			    			</table>
			    		</div>
			    	</div>

			    	<div class="row">
			    		<div class="dataTables_paginate paging_simple_numbers col-lg-6 col-lg-offset-3" id="dataTables-example_paginate">
						<!-- 显示用户列表分页 -->
						{!! $user->render() !!}
						</div>
			    	</div>
			    </div>
            </div>
        </div>
    </div>
</div>   
@endsection	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                        
	                                   
